1. Field of the Invention
The present invention relates to a method of and an apparatus for detecting pattern defects applicable to pattern defect inspection of printed wiring boards, IC mask patterns, lead frames and the like.
2. Description of the Prior Art
In pattern defect inspection of printed wiring boards and the like, pattern matching and feature extraction methods are principally employed for detecting pattern defects. In the former method, the image pattern of a reference object is overlapped and compared with image patterns of objects subject to inspection to detect defective portions (e.g., Japanese Patent Laying-Open Gazette No. 2069/1984, Japanese Patent Publication Gazette No. 61604/1985). In the latter method, various features of a reference image pattern, such as line width, angle, specific pattern and the like, are stored and compared with the features of inspected image patterns. Observed features not coinciding with such reference features indicate the presence of a defect (e.g., Japanese Patent Laying-Open Gazette No. 149905/1982).
In a pattern defect detecting technique employing the aforementioned pattern matching method, however, inspected objects must be accurately registered in a prescribed position prior to inputting image patterns to be inspected. Hence, considerable accuracy is required of such an inspection mechanism. When an inspected object itself is distorted, misregistration caused by such distortion compounds the mechanical misregistration problem. These phenomena cause extreme difficulty in detecting actual defects merely by pattern matching.
In consideration of such problems, there have been proposed pattern defect detecting methods such as those disclosed in Japanese Patent Laying-Open Gazette No. 57929/1985 and Japanese Patent Application No. 100148/1985 in the name of Dainippon Screen Mfg. Co., Ltd. In these pattern defect detection methods, the digitized signals of an inspected image pattern and those of the reference image pattern are delayed relative to each other in two dimensions within a prescribed range. Comparison of respective pixels of the two-dimensional inspected image with the respective pixels of the reference image pattern is carried out. In such comparison of the pixels, those mismatched are counted to correct misregistration on the basis of a delay position with the minimum count value. Digitized signals corresponding to a pixel pattern for comparison are two-dimensionally extracted from a group of digitized signals thus corrected. Signal comparison between the extracted digitized signals and the digitized signal of the pixel pattern is employed to detect pattern defects. Misregistration between the patterns is corrected with the minimum count value in this pattern defect detecting method, whereas the position with the minimum number of mismatched pixels as counted is not necessarily the optimum matching position. A fault may accordingly be caused in pattern detection.
Consider a case where an object pattern as shown in FIG. 17A, having a concavity M of about 2.times.2 pixels, is compared with a master pattern as shown in FIG. 17B. It is assumed that quantization errors N totaling six pixels appear in edge portions respectively as shown in FIGS. 17A and 17B. When the object pattern is compared with the master pattern in an originally matched position, i.e., a position in which the concavities M of the patterns are matched, 12 mismatched pixels are counted as shown in FIG. 17C. On the other hand, the minimum mismatch number is obtained in a position as shown in FIG. 17D in which the quantization errors N of the patterns are matched, resulting in eight mismatched pixels being counted. Thus, misregistration is not necessarily optimally corrected on the basis of the minimum value of mismatched pixels in the aforementioned pattern defect detecting method.
Assuming that compared/counted areas of an object pattern and a master pattern are in the size of approximately 508.times.508 pixels including eight patterns as shown in FIG. 18A, unstable areas with quantization errors along surface boundaries extend to 508.times.2.times.8.perspectiveto.8000 pixels. When there is no defect, therefore, a mismatch number of up to a maxium of about 8000 may possibly appear while the count value is merely increased by about 5.times.5.times.2=50 pixels in positions for comparing the object pattern with the master pattern, i.e., the positions in which the patterns are misregistered, even if concavities of 5.times.5 pixels are present in the original patterns. Thus, when the degree of matching of the quantization errors is improved in the aforementioned comparison, the false position as shown in FIG. 18B may possibly be selected as an optimum position for comparison, i.e., the position with the minimum mismatch count value, similar to the case of FIG. 17C.